package com.cloudwise.controller;

import com.cloudwise.entity.Dept;
import com.cloudwise.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author ：Teacher陈
 * @date ：Created in 2020/12/11 15:09
 * @description：部门业务控制器
 * @modified By：
 * @version: 1
 */
@Controller
public class DeptController {
    @Autowired
    private DeptService deptService;
    @RequestMapping("/findAllDept")
    @ResponseBody
    public List<Dept> findAllDept(){
        List<Dept> allDept = deptService.findAllDept();
        return allDept;
    }
}
